#ifndef DEVICEFILE_H
#define DEVICEFILE_H

#include "device_file.h"
#include "json_helper.h"

class DeviceSignFile : public DeviceFile
{
public:
    DeviceSignFile();
    ~DeviceSignFile() override;

    unsigned char getDeviceNumber() const override;

    QString getDeviceSerialNumber() const override;

    int setExposureAmount(double value_update) override;
    unsigned int getExposureAmount() const override;

    int clearStorage(unsigned char position, unsigned short number) override;

    int interStorageRollingOverlay() override;

    int getStorageCapacity(unsigned int &internal_storage, unsigned int &external_storage) override;

private:
    //清除全部存储
    int clearStorageAllData(unsigned char storage_position);
    //清除部分存储
    int clearStoragePartData(unsigned char storage_position, unsigned short number);
    //删除最早的图片
    int deleteEarliestImage();

private:
    unsigned short surplus_storage_ = 3000;

    //存储设备配置信息
    QJsonObject power_on_device_message_;
};

#endif // DEVICEFILE_H
